package studentinformationmanagementsystem.entity;

import java.io.Serializable;
import java.util.Objects;


/**
 * @author 苗庆
 * @version 1.0
 * 管理员对象实体类
 */
public class Admin implements Serializable {
    private static final long serialVersionUID = 1L;

    //管理员id
    private Integer adminid;
    //管理员账号
    private String username;
    //管理员密码
    private String password;
    //管理员类别: 1为普通管理员、2为超级管理员

    //1.普通管理员：可以增改查删

    //2.除了可以增加删除修改查其他对象信息还可以对管理员进行增加删除修改查询等管理
    private String type;

    //是否已经删除 0未删除 1已经删除
    private Integer IsDelete;


    public Admin() {
    }

    public Admin(Integer adminid, String username, String password, String type, Integer isDelete) {
        this.adminid = adminid;
        this.username = username;
        this.password = password;
        this.type = type;
        IsDelete = isDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Admin admin = (Admin) o;
        return adminid.equals(admin.adminid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(adminid);
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminid=" + adminid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", type='" + type + '\'' +
                ", IsDelete=" + IsDelete +
                '}';
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getAdminid() {
        return adminid;
    }

    public void setAdminid(Integer adminid) {
        this.adminid = adminid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getIsDelete() {
        return IsDelete;
    }

    public void setIsDelete(Integer isDelete) {
        IsDelete = isDelete;
    }
}
